lib: Add ostree_repo_reload_config()
authorColin Walters <walters@verbum.org>
Mon, 30 Jan 2017 06:43:37 +0000 (07:43 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 7 Feb 2017 16:12:58 +0000 (16:12 +0000)
commit9c0af41710fc3800a3b02dd552b96890bf1d432f
tree01dbe99f9201ee7c2ab0459ddabef399540964de
parent200887c7c92032a1d939c1201d1d86813bdf4d80
lib: Add ostree_repo_reload_config()

For a long time we've cached the remote configs in the repo, which
mostly makes sense for the `repo/config` file, but less sense
for `/etc/ostree/remotes.d`, because we want to support admins
interactively editing them.

One can delete the repo instance and create a new one, but that's a bit ugly.
Let's introduce an API for this so rpm-ostree can reload remotes after
admins/scripts edit them in `/etc`.  We also might as well reload
any other entries in the config.

Structurually now, `ostree_repo_open()` deals with file descriptors, and then
calls `ostree_repo_reload_config()`. Except for the uncompressed cache, which is
the only thing that deals with FDs that can be configured. But we want to delete
that anyways.

No tests, since...we don't have a daemon in this codebase, don't want to shave
that yak just today.

Closes: #662
Approved by: jlebon
apidoc/ostree-sections.txt
src/libostree/libostree.sym
src/libostree/ostree-repo.c
src/libostree/ostree-repo.h